import { zhCN, dateZhCN, enUS, dateEnUS, zhTW, dateZhTW } from 'naive-ui'

export const HomeTag: Tag = { name: _ViewName.Home, path: _ViewPath.Home }

export const Languages: Language[] = [
  {
    id: _Language.zhCN,
    label: '简体中文',
    language: zhCN,
    dateLanguage: dateZhCN
  },
  {
    id: _Language.zhTW,
    label: '繁體中文',
    language: zhTW,
    dateLanguage: dateZhTW
  },
  {
    id: _Language.enUS,
    label: '英文',
    language: enUS,
    dateLanguage: dateEnUS
  }
]

export const IdColumn = {
  key: 'id',
  title: '主键',
  width: 200
}

export const BaseColumns = [
  {
    key: 'creator',
    title: '创建人',
    width: 80
  },
  {
    key: 'createTime',
    title: '创建时间',
    width: 200,
    render(row: BasePO) {
      return formatDate(row.createTime)
    }
  },
  {
    key: 'modifier',
    title: '修改人',
    width: 80
  },
  {
    key: 'modifyTime',
    title: '修改时间',
    width: 200,
    render(row: BasePO) {
      return formatDate(row.modifyTime)
    }
  }
]
